package com.hs.srm.admin.modules.notice.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.hs.srm.base.common.base.CloneableEntity;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * 通知角色实体类
 *
 * @author ych
 * @since 2020-04-02 10:15:44
 */
@Setter
@Getter
@TableName("notice_role")
public class NoticeRoleEntity implements Serializable, CloneableEntity<NoticeRoleEntity> {

    private static final long serialVersionUID = -22361245571433030L;

    /**
     * 通知、角色关联表id
     */
    @TableId(value = "pk_id", type = IdType.UUID)
    @TableField("pk_id")
    private String pkId;

    /**
     * notice_definition_manage  id
     */
    @TableField("notice_id")
    private String noticeId;

    /**
     * 角色id
     */
    @TableField("role_id")
    private Integer roleId;

    @Override
    public NoticeRoleEntity clone() {
        try {
            return (NoticeRoleEntity) super.clone();
        } catch (CloneNotSupportedException ex) {
            ex.printStackTrace();
        }
        return null;
    }
}